package com.xtayfjpk.zookeeper.test.master_workers.callback.worker;

import org.apache.zookeeper.data.Stat;

import com.xtayfjpk.zookeeper.test.master_workers.Worker;
import com.xtayfjpk.zookeeper.test.master_workers.callback.BaseStatCallback;

public class WorkerStatusUpdateCallback extends BaseStatCallback {
	private Worker worker;
	
	public WorkerStatusUpdateCallback(Worker worker) {
		this.worker = worker;
	}
	
	@Override
	protected void connectionLossCaseAction(int rc, String path, Object ctx, Stat stat) {
		worker.updateStatus((String)ctx);
	}
}
